package com.paul.sys.service.impl;

import com.paul.sys.mapper.RoadParkInfoMapper;
import com.paul.sys.model.RoadParkInfo;
import com.paul.sys.service.RoadParkInfoService;
import com.paul.sys.tools.CommPageBean;
import com.paul.sys.tools.PageData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service
public class RoadParkInfoServiceImpl implements RoadParkInfoService {

    @Autowired
    private RoadParkInfoMapper roadParkInfoMapper;





    @Override
    public RoadParkInfo selectByPrimaryKey(Integer id){
        return roadParkInfoMapper.selectByPrimaryKey(id);
    }




    @Override
    public Integer selectMaxId(){
        return roadParkInfoMapper.selectMaxId();
    }



    @Override
    public PageData<RoadParkInfo> listByPage(Map<String, String> param) {
        PageData<RoadParkInfo> pageData = new PageData<RoadParkInfo>();
        CommPageBean pageBean = CommPageBean.getPageBeanByParam(param);
        List<RoadParkInfo> list = roadParkInfoMapper.listByPage(param, pageBean);
        pageData.setPageBean(pageBean);
        pageData.setListData(list);


        return pageData;
    }



    @Override
     public Integer countAll(Map<String,String> param){
         return roadParkInfoMapper.countAll(param);
     }

    @Override
    public int updateByRecord(RoadParkInfo roadparkinfo) {
        return roadParkInfoMapper.updateByRecord(  roadparkinfo);
    }

    @Override
    public int updateById(RoadParkInfo roadparkinfo) {
        return roadParkInfoMapper.updateById(roadparkinfo);
    }


}
